<div class="slider-block">
    <div id="slide">			  	
        <!-- slider -->
        <div class="gallery">
            <ul class="items">
            <?php 
                foreach($advs as $adv):
                    $url_path = $adv->url_path == "#Click vào đây để thay đổi đường dẫn ảnh" ? "#" : $adv->url_path;
                    $title = ($adv->title == NULL || $adv->title == 'Title') ? '' : $adv->title;
            ?>
                <li>
                    <a href="<?php echo $url_path;?>">
                        <img src="/images/advs/<?php echo $adv->image_name;?>" alt="<?php echo $title;?>">
                    </a>
                </li>
            <?php endforeach;?>
            </ul>
        </div>
        <!-- slider end -->	
    </div>
    <div class="pag">
        <div class="img-pags">
            <ul>
                <?php  foreach($advs as $adv):?>
                <li><a href="#"><span><img src="/images/advs/thumbnails/<?php echo $adv->image_name;?>" alt="<?php echo $title;?>"></span></a></li>
            <?php endforeach;?>
                <!--<li class="last"><a href="#"><span><img src="/images/thumb_slide6.jpg" alt=""></span></a></li>-->
            </ul>
        </div>
        <div class="but">
            <a href="#" class="button-2 prev" data-type="prevPage"></a>
            <a href="#" class="button-2 next" data-type="nextPage"></a>
        </div>
    </div>
</div>